/*
========================================================================
 Name        : QueryListSettings.cpp
 Author      : shitou
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
/**
 *	Generated helper class which manages the settings contained 
 *	in 'QueryList'.  Each CAknSettingItem maintains
 *	a reference to data in this class so that changes in the setting
 *	item list can be synchronized with this storage.
 */
 
// [[[ begin generated region: do not modify [Generated Includes]
#include <e32base.h>
#include <stringloader.h>
#include <barsread.h>
#include <TaobaoMobile.rsg>
#include "QueryListSettings.h"
// ]]] end generated region [Generated Includes]

/**
 * C/C++ constructor for settings data, cannot throw
 */
TQueryListSettings::TQueryListSettings()
	{
	}

/**
 * Two-phase constructor for settings data
 */
TQueryListSettings* TQueryListSettings::NewL()
	{
	TQueryListSettings* data = new( ELeave ) TQueryListSettings;
	CleanupStack::PushL( data );
	data->ConstructL();
	CleanupStack::Pop( data );
	return data;
	}
	
/**
 *	Second phase for initializing settings data
 */
void TQueryListSettings::ConstructL()
	{
	// [[[ begin generated region: do not modify [Generated Initializers]
		{
		HBufC* text = StringLoader::LoadLC( R_QUERY_LIST_NAME );
		SetName( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
		{
		HBufC* text = StringLoader::LoadLC( R_QUERY_LIST_NICK );
		SetNick( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
		{
		HBufC* text = StringLoader::LoadLC( R_QUERY_LIST_CODE );
		SetCode( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
	SetBeginDate( TTime( TDateTime( 2000, EJanuary, 0, 0, 0, 0, 0 ) ) );
	SetBeginTime( TTime( TDateTime( 0, EJanuary, 0, 0, 0, 0, 0 ) ) );
	SetEndDate( TTime( TDateTime( 2000, EJanuary, 0, 0, 0, 0, 0 ) ) );
	SetEndTime( TTime( TDateTime( 0, EJanuary, 0, 0, 0, 0, 0 ) ) );
	// ]]] end generated region [Generated Initializers]
	
	}
	
// [[[ begin generated region: do not modify [Generated Contents]
TDes& TQueryListSettings::Name()
	{
	return iName;
	}

void TQueryListSettings::SetName(const TDesC& aValue)
	{
	if ( aValue.Length() < KNameMaxLength)
		iName.Copy( aValue );
	else
		iName.Copy( aValue.Ptr(), KNameMaxLength);
	}

TDes& TQueryListSettings::Nick()
	{
	return iNick;
	}

void TQueryListSettings::SetNick(const TDesC& aValue)
	{
	if ( aValue.Length() < KNickMaxLength)
		iNick.Copy( aValue );
	else
		iNick.Copy( aValue.Ptr(), KNickMaxLength);
	}

TDes& TQueryListSettings::Code()
	{
	return iCode;
	}

void TQueryListSettings::SetCode(const TDesC& aValue)
	{
	if ( aValue.Length() < KCodeMaxLength)
		iCode.Copy( aValue );
	else
		iCode.Copy( aValue.Ptr(), KCodeMaxLength);
	}

TTime& TQueryListSettings::BeginDate()
	{
	return iBeginDate;
	}

void TQueryListSettings::SetBeginDate(const TTime& aValue)
	{
	iBeginDate = aValue;
	}

TTime& TQueryListSettings::BeginTime()
	{
	return iBeginTime;
	}

void TQueryListSettings::SetBeginTime(const TTime& aValue)
	{
	iBeginTime = aValue;
	}

TTime& TQueryListSettings::EndDate()
	{
	return iEndDate;
	}

void TQueryListSettings::SetEndDate(const TTime& aValue)
	{
	iEndDate = aValue;
	}

TTime& TQueryListSettings::EndTime()
	{
	return iEndTime;
	}

void TQueryListSettings::SetEndTime(const TTime& aValue)
	{
	iEndTime = aValue;
	}

// ]]] end generated region [Generated Contents]

